package com.danciyixue.boot.dcyx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.danciyixue.boot.dcyx.model.entity.TestQuestions;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.danciyixue.boot.dcyx.model.query.TestQuestionsQuery;
import com.danciyixue.boot.dcyx.model.vo.TestQuestionsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * 测试题目Mapper接口
 *
 * @author youlaitech
 * @since 2025-06-15 16:30
 */
@Mapper
public interface TestQuestionsMapper extends BaseMapper<TestQuestions> {

    /**
     * 获取测试题目分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<TestQuestionsVO>} 测试题目分页列表
     */
    Page<TestQuestionsVO> getTestQuestionsPage(Page<TestQuestionsVO> page, TestQuestionsQuery queryParams);

    /**
     * 根据测试ID查询所有测试题目
     *
     * @param testId 测试ID
     * @return 测试题目列表
     */
    List<TestQuestions> findByTestId(@Param("testId") Long testId);

}
